<template>
	<view class="page" :class="{pagenew: titleClick === '1'}">
		<view v-show="titleClick === '3'" class="find-job flex-align">
			<image class="left-arrow" src="../../../static/left-arrow.png" mode=""></image>
			<view class="search-contont flex-align">
				<view class="search-name flex-align">
					<u-icon name="search" color="#BDBDBD"></u-icon>
					<u--text class="siteutext" text="搜索职位名称" color="#BDBDBD" size="32rpx"></u--text>
				</view>
				<u-button type="primary" text="搜索" color="#1872FF"></u-button>
			</view>
		</view>
		<view v-show="titleClick === '3'" class="experience flex-align flex-between">
			<view class="flex sfilterbox" v-for="item in findJobList">
				{{item}}
				<u--image src="../../../static/right-triangle.png" width="5px" height="5px"></u--image>
			</view>
		</view>
		<view class="search-plus flex-between">
			<text>职聊社交</text>
			<view class="flex-align">
				<navigator url="/pages/job-seekers/talent-pool/index">
					<u-icon name="search"></u-icon>
				</navigator>
				<u-icon class="plus" name="plus"></u-icon>
			</view>
		</view>
		<view class="flex-between rtop">
			<view class="flex recommend">
				<u-link @click="recommendClick" :class="{recomClick: titleClick === '1'}" href="#" text="推荐"></u-link>
				<u-link @click="selectedClick" :class="{recomClick: titleClick === '2'}" href="#" text="精选"></u-link>
				<u-link @click="lastClick" :class="{recomClick: titleClick === '3'}" href="#" text="最新"></u-link>
			</view>
			<view class="flex cqfilter">
				<navigator url="/pages/job-seekers/filter/index">
					<view class="flex filterbox">
						重庆
						<u--image src="../../../static/right-triangle.png" width="5px" height="5px"></u--image>
					</view>
				</navigator>
				<navigator url="/pages/job-seekers/location/index">
					<view class="flex filterbox">
						筛选
						<view class="">
							<u-badge :isDot="true" type="success" bgColor="#FC4848"></u-badge>
							<u--image src="../../../static/right-triangle.png" width="5px" height="5px"></u--image>
						</view>
					</view>
				</navigator>
			</view>
		</view>
		<view v-show="titleClick === '2'" class="chatCard flex-justify">
			<image class="light-bulb" src="../../../static/light-bulb.png" mode=""></image>
			<u--text text="由搜索列表挑选的精选求职者，开聊请使用畅聊卡" color="#E77829" size="24rpx"></u--text>
		</view>
		<u--text v-show="titleClick === '1'" class="job-seeker" text="求职者信息已更新" color="#1872FF" size="28rpx"
			margin="14rpx 0rpx 12rpx 0rpx"></u--text>
		<view class="bgprefer">
			<view v-show="titleClick === '1'" class="bgpre">
				<u--text class="studyAbroad" text="此职位是否对候选人的留学背景有偏好？" color="#3d3d3d" size="38rpx" bold></u--text>
				<u--image @click="showPreferSetting" class="cancel-icon" src="../../../static/cancel.png" width="28rpx"
					height="28rpx"></u--image>
				<u--text text="我们将根据您的选择，为您优化推荐求职者" color="#3d3d3d" size="24rpx"
					margin="22rpx 0rpx 26rpx 0rpx"></u--text>
				<view class="flex colleges">
					<view class="unicoll">
						留学生优先
					</view>
					<view class="unicoll">
						国内院校优先
					</view>
					<view class="unicoll">
						不限
					</view>
				</view>
			</view>
			<view class="bgpre name-ava" v-for="item in 6" @click="joberDetail">
				<view class="avatar flex-between">
					<view class="">
						<view class="name flex">
							<u--text class="xingming" text="郭春香" color="#3d3d3d" size="38rpx"></u--text>
							<u--text text="刚刚活跃" color="#6D6D6D;" size="24rpx"></u--text>
						</view>
						<view class="saraly flex">
							<view class="">6年</view>
							<view class="">本科</view>
							<view class="">20-22K</view>
						</view>
					</view>
					<u-avatar src="" shape="square" size="40"></u-avatar>
				</view>
				<view class="university flex-align">
					<image src="../../../static/mortarboard.png" mode=""></image>
					<u--text class="daxue" text="重庆大学" color="#3d3d3d" size="38rpx"></u--text>
				</view>
				<view class="university flex-align">
					<image src="../../../static/mortarboard.png" mode=""></image>
					<u--text class="daxue" text="锐明股份 · 产品经理" color="#3d3d3d" size="38rpx"></u--text>
				</view>
				<view class="flex products">
					<view class="unicoll">产品竞争</view>
					<view class="unicoll">用户需求</view>
					<view class="unicoll">产品规划</view>
					<view class="unicoll">需求分析</view>
				</view>
				<view class="flex commercial">
					<view class="content ellipsis-multiline">
						1.2年的商用车载安防产品规划及解决方案工作经验，熟悉视频服务，后装硬件产品。2.对国内外商用车载安全对国内外商用车载安全
					</view>
					<u--image src="../../../static/cancel.png" width="28rpx" height="28rpx"></u--image>
				</view>
			</view>
		</view>
		<u-popup :show="show" @close="close" @open="open" :round="12">
			<view class="">
				<u--text class="studyAbroad" text="不再展示招聘偏好设置" color="#3d3d3d" size="38rpx" bold
					margin="32rpx 0rpx 0rpx 38rpx"></u--text>
				<u--image @click="close" class="cancel-popup" src="../../../static/cancel.png" width="28rpx"
					height="28rpx"></u--image>
				<u--text class="preferContent" text="填写招聘偏好，平台将为您推荐更合适的求职者。您可在编辑职位-职位关键词中修改。" color="#6D6D6D"
					size="24rpx" margin="16rpx 0rpx 22rpx 36rpx"></u--text>
				<view class="preferImg flex-justify">
					<u--image src="../../../static/cancel.png" width="276rpx" height="206rpx"></u--image>
				</view>
				<view class="cleanUp flex-justify">
					<u-button @click="close" text="取消"></u-button>
					<u-button @click="close" type="primary" text="不再展示"></u-button>
				</view>
			</view>
		</u-popup>
		<tabbar :tabindex="tabsIndex"></tabbar>
	</view>
</template>

<script>
	import tabbar from '../../../component/tabbar/index.vue'
	export default {
		components: {
			tabbar
		},
		data() {
			return {
				tabsIndex: '1',
				value1: 0,
				show: false,
				titleClick: '1',
				findJobList: ['重庆', '排序', '学历', '经验', '技能', '更多']
			}
		},
		onLoad() {

		},
		methods: {
			showPreferSetting() {
				this.show = true
			},
			open() {
				// console.log('open');
			},
			close() {
				this.show = false
				// console.log('close');
			},
			recommendClick(e) {
				this.titleClick = '1'
			},
			selectedClick(e) {
				this.titleClick = '2'
			},
			lastClick() {
				this.titleClick = '3'
			},
			joberDetail() {
				wx.navigateTo({
					url: '/pages/job-seekers/job-seeker-detail/index',
					success: function(res) {
						// 通过eventChannel向被打开页面传送数据
						res.eventChannel.emit('acceptDataFromOpenerPage', {
							data: 'test'
						})
					}
				})
			}
		}
	}
</script>

<style>
	.tabbar {
		width: 100%;
		position: fixed;
		bottom: 0;
		left: 0;
		z-index: 99;

	}

	/* .page {
		background: url(../../../static/topbg.png) no-repeat;
		background-size: 100%;
	} */

	.pagenew {
		background-color: #ffffff;
	}

	.recomClick {
		font-weight: bold !important;
		font-style: italic
	}

	.search-plus {
		padding: 0rpx 16rpx 34rpx 34rpx;
		background-color: white;
	}

	.search-plus text {
		font-size: 42rpx;
		font-weight: bold;
	}

	::v-deep .u-icon__icon span {
		font-size: 56rpx;
		font-weight: bold;
	}

	::v-deep .plus span {
		width: 46rpx;
		height: 46rpx;
		line-height: 46rpx;
		font-size: 38rpx;
		font-weight: bold;
		margin-left: 8rpx;
	}


	.recommend {
		column-gap: 28rpx;
	}

	::v-deep .recommend .u-link {
		font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
		font-weight: 400;
		font-size: 32rpx !important;
		color: #3D3D3D !important;
		line-height: 42rpx !important;
	}

	.rtop {
		padding: 0rpx 30rpx 12rpx 28rpx;
		background-color: white;
	}

	.cqfilter {
		column-gap: 18rpx;
	}


	.filterbox,
	.sfilterbox {
		width: 104rpx;
		height: 56rpx;
		background: #F5F5F5;
		border-radius: 4rpx 4rpx 4rpx 4rpx;
		font-size: 24rpx;
		color: #6D6D6D;
		justify-content: center;
		align-items: center;
	}

	::v-deep .filterbox:nth-child(1) .u-transition,
	::v-deep .sfilterbox .u-transition {
		margin-top: 13rpx;
	}

	::v-deep .u-transition {
		margin-left: 4rpx;
	}

	.u-badge {
		width: 12rpx;
		height: 12rpx;
		margin: -8rpx 0rpx 9rpx 0rpx;
	}

	::v-deep .job-seeker {
		flex-direction: column;
		justify-content: center;
	}

	.bgprefer {
		padding: 0rpx 14rpx;
	}

	.bgpre {
		width: calc(100%-32rpx);
		padding: 40rpx 16rpx 30rpx 16rpx;
		background-color: #FEFFFF;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		position: relative;
	}

	.studyAbroad {
		white-space: nowrap;
	}

	::v-deep .cancel-icon {
		position: absolute;
		top: 20rpx;
		right: 22rpx;
	}

	.colleges {
		column-gap: 26rpx;
	}

	.colleges .unicoll {
		width: 204rpx;
		height: 70rpx;
		background: #F5F5F5;
		border-radius: 4rpx 4rpx 4rpx 4rpx;
		font-size: 24rpx;
		color: #6D6D6D;
		text-align: center;
		line-height: 70rpx;
	}

	.name-ava {
		margin-top: 16rpx;
	}

	.avatar {
		align-items: center;
	}

	.name {
		align-items: flex-end;
	}

	.xingming {
		/* width: 140rpx; */
		margin-right: 1rpx !important;
		line-height: 43rpx;
		white-space: nowrap;
	}

	.saraly view {
		width: 52rpx;
		height: 24rpx;
		font-family: Source Han Sans, Source Han Sans;
		font-weight: 400;
		font-size: 24rpx;
		color: #6D6D6D;
		line-height: 24rpx;
		text-align: left;
		white-space: nowrap;
		margin-top: 16rpx;
		padding: 0 20rpx;
		border-right: 1px solid #8d8d8d;
	}

	.saraly view:nth-child(3) {
		border: none;
	}

	.saraly view:nth-child(1) {
		padding-left: 0rpx;
	}

	.university {
		margin-top: 12rpx;
		align-items: center;
	}

	.university image {
		width: 18px;
		height: 13px;
	}

	::v-deep .daxue .u-text__value {
		font-family: Source Han Sans, Source Han Sans;
		font-weight: 400 !important;
		font-size: 28rpx !important;
		color: #6D6D6D !important;
		line-height: 40rpx !important;
		margin-left: 16rpx !important;
	}

	.products {
		column-gap: 12rpx;
		margin: 30rpx 0rpx 18rpx 0rpx;
	}

	.products view {
		width: 112rpx;
		height: 38rpx;
		background: #F5F5F5;
		border-radius: 4rpx 4rpx 4rpx 4rpx;
		font-family: Source Han Sans, Source Han Sans;
		font-weight: 400;
		font-size: 24rpx;
		color: #6D6D6D;
		line-height: 38rpx;
		text-align: center;
	}

	.commercial {
		align-items: flex-end;
		column-gap: 48rpx;
	}

	.commercial .content {
		font-size: 24rpx;
		color: #8A8A8A;
		line-height: 34rpx;
		text-align: left;
	}


	/* 调节 */
	.left-arrow {
		width: 40rpx;
		height: 40rpx;
	}

	.find-job {
		column-gap: 34rpx;
		padding: 0rpx 36rpx 26rpx;
		background-color: #ffffff;
	}

	.search-contont {
		flex: 1;
	}

	.search-contont .u-button {
		width: 110rpx;
		height: 80rpx;
		background: #1872FF;
		border-radius: 0rpx 16rpx 16rpx 0rpx;
		border: 2rpx solid #1872FF;
	}

	::v-deep .search-contont .u-button__text span {
		font-size: 32rpx;
	}

	.search-name {
		width: 100%;
		height: 80rpx;
		background: #FFFFFF;
		border-radius: 2rpx 0rpx 0rpx 16rpx;
		border: 2rpx solid #1872FF;
		box-sizing: border-box;
		padding-left: 22rpx;
		column-gap: 5rpx;
		align-items: center;
	}

	.experience {
		padding: 2rpx 24rpx;
		background-color: #ffffff;
		margin-bottom: 16rpx;
	}

	.sfilterbox {
		background-color: transparent;
	}

	.cancel-popup {
		position: absolute;
		top: 26rpx;
		right: 34rpx;
	}

	.preferImg {
		margin-bottom: 18rpx;
	}

	.cleanUp {
		width: 100%;
		background-color: #ffffff;
		padding: 26rpx 0rpx 20rpx 0rpx;
		column-gap: 20rpx;
		box-shadow: 0rpx -8rpx 16rpx 0rpx rgba(208, 208, 208, 0.3);
	}

	.cleanUp .u-button:after {
		content: none;
	}

	.cleanUp .u-button:nth-child(1) {
		/* margin-left: 22rpx; */
		width: 332rpx;
		height: 74rpx;
		background-color: #D8D8D8;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		color: #3D3D3D;
		margin: 0;
	}

	.cleanUp .u-button:nth-child(2) {
		/* margin-right: 20rpx; */
		color: #FFFFFF;
		width: 332rpx;
		height: 74rpx;
		background-color: #429CFD;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		margin: 0;
	}

	::v-deep .cleanUp .u-button span {
		font-size: 36rpx;
	}

	.chatCard {
		width: 100%;
		height: 68rpx;
		background-color: #F7DED1;
		column-gap: 10rpx;
		margin-bottom: 18rpx;
	}

	.chatCard .u-text {
		flex: 0;
		white-space: nowrap;
	}

	.light-bulb {
		width: 32rpx;
		height: 32rpx;
	}
</style>